<template>
  <div class="loadHomeWork">
    <div class="loadHomeWorkIneer">
      <div class="loadTop">LNG客户信息</div>
      <div class="loadSecond"></div>
      <div class="loadExcel loadExcel2">
        <div class="button" type="success" @click="addOne()">新增</div>
      </div>
      <!-- 第一个table -->
      <div class="table table1" :style="{ width: tableWidth }">
        <div class="lngCompany">
          <div class="everyCompanyContain" v-for="item in this.tableData">
            <img
              :src="imageSrc(item.image)"
              alt=""
              @click="clickEdit(item.id)"
            />
            <div class="companyName">
              {{ item.companyChineseName }}&nbsp&nbsp{{
                item.companyEnglishName
              }}
            </div>
          </div>
        </div>
        <!-- 内容过多，会出现滚动条 -->
      </div>
    </div>
    <div class="dialog" ref="dialog" :style="{ display: show }">
      <div class="loadHomeWorkIneer">
        <div class="changeTop">
          <div
            class="delete"
            @click="deleteOne(id)"
            v-show="addOrEdit == '编辑'"
          >
            删除
          </div>
          <div class="sure" @click="sureAdd()">确认</div>
          <div class="back" @click="backToIndex()">返回</div>
        </div>
        <!-- <div class="dialogText">{{ addOrEdit }}</div> -->
        <div class="manyInput">
          <div class="iuptInnerContain">
            <div class="logoAndName">
              <img
                v-if="image"
                class="logo"
                @click="uploadLogo()"
                :src="imageSrc(image)"
              />
              <div class="name1" v-else @click="uploadLogo()">上传logo</div>

              <div class="name">
                <div class="chineseName">
                  <input
                    type="text"
                    contenteditable="true"
                    v-model="companyChineseName"
                    placeholder="中文船名"
                  />
                </div>
                <div class="EnglishName">
                  <input
                    type="text"
                    contenteditable="true"
                    v-model="companyEnglishName"
                    placeholder="英文船名"
                  />
                </div>
              </div>
            </div>
            <el-table
              empty-text="暂无数据"
              :data="contractInfo"
              :header-cell-style="{
                background: '#FAFAFA',
                color: '#777676 !important',
                fontWeight: '800',
                height: '20px',
              }"
              :row-style="{ height: 30 + 'px' }"
              :cell-style="{ padding: 0 + 'px' }"
              border
              stripe
              style="width: 100%; height: auto; margin-top: 20px"
              max-height="190px"
            >
              <el-table-column
                label="合同名"
                align="center"
                prop="contractName"
                min-width="200"
              >
                <template #default="scope">
                  <div class="scopeInnerBox">
                    <input type="text" v-model="scope.row.contractName" />
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                label="合同签订日期"
                align="center"
                prop="contractSigningDate"
                width="130"
              >
                <template #default="scope">
                  <div class="scopeInnerBox">
                    <el-config-provider :locale="locale">
                      <el-date-picker
                        :clearable="false"
                        v-model="scope.row.contractSigningDate"
                        format="YYYY/MM/DD"
                        value-format="YYYY/MM/DD"
                        style="width: 100%; height: 25px"
                      />
                    </el-config-provider>
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                label="合同形式"
                align="center"
                prop="contractSigningForm"
              >
                <template #default="scope">
                  <div class="scopeInnerBox">
                    <input
                      type="text"
                      v-model="scope.row.contractSigningForm"
                    />
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                label="合同期限"
                align="center"
                prop="contractPeriod"
              >
                <template #default="scope">
                  <div class="scopeInnerBox">
                    <input type="text" v-model="scope.row.contractPeriod" />
                  </div> </template
              ></el-table-column>
              <el-table-column
                label="计量形式"
                align="center"
                prop="meteringForm"
              >
                <template #default="scope">
                  <div class="scopeInnerBox">
                    <input type="text" v-model="scope.row.meteringForm" />
                  </div> </template
              ></el-table-column>
              <el-table-column
                label="MN值要求"
                align="center"
                prop="mn_value_require"
              >
                <template #default="scope">
                  <div class="scopeInnerBox">
                    <input type="text" v-model="scope.row.mn_value_require" />
                  </div> </template
              ></el-table-column>
              <el-table-column
                label="温压要求"
                align="center"
                prop="temperature_require"
              >
                <template #default="scope">
                  <div class="scopeInnerBox">
                    <input
                      type="text"
                      v-model="scope.row.temperature_require"
                    />
                  </div> </template
              ></el-table-column>
              <el-table-column label="操作" align="center" width="30">
                <template #default="scope">
                  <div
                    class="deleteOneObj"
                    style="
                      margin: auto;
                      width: 20px;
                      height: 20px;
                      font-size: 14px;
                      background: #f646ff;
                      border-radius: 50%;
                      color: white;
                      line-height: 19px;
                    "
                    @click="deleteOneObj(scope.$index)"
                  >
                    —
                  </div>
                </template>
              </el-table-column>
            </el-table>
            <div class="addOneObj" @click="addOneObject()">+</div>

            <el-table
              empty-text="暂无数据"
              v-show="addOrEdit == '编辑'"
              :data="tableListDate"
              :span-method="mergeCells"
              :header-cell-style="{
                background: '#FAFAFA',
                color: '#777676 !important',
                fontWeight: '800',
                height: '20px',
              }"
              :row-style="{ height: 30 + 'px' }"
              :cell-style="{ padding: 0 + 'px' }"
              border
              stripe
              style="width: 100%; height: auto; margin-top: 20px"
              max-height="190px"
            >
              <el-table-column label="船型数量" prop="length" align="center">
              </el-table-column>
              <el-table-column label="船型" prop="shipType"> </el-table-column>
              <el-table-column label="船舶数量" prop="number">
              </el-table-column>
              <el-table-column label="船舶名" prop="shipName">
                <template #default="scope">
                  <div class="scopeInnerBox">
                    <select>
                      <option
                        v-for="(item, index) in scope.row.shipNameList"
                        :valeu="item"
                        :label="item"
                        :select="index === 0"
                      ></option>
                    </select>
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
    </div>

    <div class="dialog2" :style="{ display: uploadfile }">
      <div class="upContain">
        <input
          type="file"
          ref="clearFile"
          class="addfile"
          @change="getFile($event)"
          accept=".jpeg,.jpg,.png"
        />
      </div>
      <div class="fileName">
        <div v-show="fileName">文件名:{{ fileName }}</div>
      </div>
      <div class="upFileSrue">
        <button class="buttonUpdata" @click="cancelUp()">取消</button>
        <button class="buttonUpdata buttonUpdata1" @click="submitAddFile()">
          确定
        </button>
      </div>
    </div>
  </div>
</template>

<script>
import EventBus from "@/mitt/eventBus.js";
import rename from "@/mitt/getPath.js";
import service from "@/api/api";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import _ from "lodash";
export default {
  name: "",
  data() {
    return {
      shipPageNumer: 1,
      compare: {},
      totalNumber: 0,
      token: "",
      compare: {},
      locale: zhCn,
      tableWidth: null,

      show: "none",
      addOrEdit: "新增",
      image: "",
      id: "",
      shipTypeList: [],
      shipTypeSumDto: {},
      companyEnglishName: "",
      companyChineseName: "",
      contractInfo: [],
      contractExpirationDate: "",
      contractNature: "",
      contractSigningDate: "",
      contractSigningForm: "",
      fleet: "",
      shipType: "",
      tableData: [],
      totalPages: null,
      tableListDate: [],
      imageContain: "",
      uploadfile: "none",
      data: {
        image: "",
        id: "",
        shipTypeList: [],
        shipTypeSumDto: {},
        companyEnglishName: "",
        companyChineseName: "",
        contractInfo: [],
        type: 0,
      },
      show1: "none",
      color: "#EBEBEB",
      color1: "#EBEBEB",
      file: null,
      fileName: "",
      logoFlag: false,
    };
  },

  methods: {
    // 修改列表内容
    backToIndex() {
      if (this.addOrEdit == "编辑") {
        let data = {
          image: this.image,
          companyEnglishName: this.companyEnglishName,
          companyChineseName: this.companyChineseName,
          contractInfo:
            this.contractInfo.length > 0
              ? JSON.stringify(this.contractInfo)
              : JSON.parse(this.compare).contractInfo,
        };
        let equal = _.isEqual(data, JSON.parse(this.compare));

        if (equal) {
          this.close();
        } else {
          this.$confirm("数据信息有变化是否保存再离开？", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            // type: "warning",
          })
            .then(() => {
              this.sureAdd();
            })
            .catch(() => {
              this.close();
            });
        }
      } else if (this.addOrEdit == "新增") {
        this.close();
      }
    },
    mergeCells({ row, column, rowIndex, columnIndex }) {
      // 只合并第一列（columnIndex === 0）
      if (columnIndex === 0) {
        // 如果是当前分类的第一个单元格
        if (
          rowIndex === 0 ||
          row.shipTypeNumber !== this.tableListDate[rowIndex - 1].shipTypeNumber
        ) {
          // 计算当前分类有多少行
          let rowspan = 1;
          for (let i = rowIndex + 1; i < this.tableListDate.length; i++) {
            if (this.tableListDate[i].shipTypeNumber === row.shipTypeNumber) {
              rowspan++;
            } else {
              break;
            }
          }
          return { rowspan, colspan: 1 }; // 合并行，列不合并
        } else {
          return { rowspan: 0, colspan: 0 }; // 被合并的单元格隐藏
        }
      }
    },
    addOneObject() {
      this.contractInfo.push({
        contractName: "",
        contractSigningDate: "",
        contractSigningForm: "",
        contractPeriod: "",
        meteringForm: "",
        mn_value_require: "",
        temperature_require: "",
      });
    },
    deleteOneObj(index) {
      this.$alert("确定删除这条信息？", {
        confirmButtonText: "确定",
        callback: (action) => {
          if (action == "confirm") {
            this.contractInfo.splice(index, 1);
            this.$message({
              type: "success",
              message: "删除成功",
            });
          } else {
            this.$message({
              type: "info",
              message: "取消删除",
            });
          }
        },
      });
    },

    submitAddFile() {
      this.$message({
        message: "Logo选择成功",
        type: "success",
      });
      this.uploadfile = "none";
      this.image = this.imageContain;
      this.fileName = "";
      document.getElementsByClassName("addfile")[0].value = "";
    },
    imageSrc(src) {
      if (src) {
        return `data:mage/png;base64,${src}`;
      } else return "";
    },
    uploadLogo() {
      this.uploadfile = "block";
    },
    // 监听第一个日期选择器的值变化

    // 导入文件================
    uploadFile() {
      this.uploadfile = "block";
    },
    async getFile(event) {
      const file = event.target.files[0];
      if (file.size > 1000000) {
        return this.$message({
          message: "文件大小超出限制",
          type: "warning",
        });
      }
      this.fileName = file.name;
      if (!file) return;

      // 创建 FileReader 对象
      const reader = new FileReader();

      // 定义读取完成时的回调
      reader.onload = (event) => {
        const base64String = event.target.result; // 获取 Base64 字符串

        // 如果需要纯 Base64 数据（去掉 data:image/png;base64, 前缀）
        const pureBase64 = base64String.split(",")[1];

        this.imageContain = pureBase64;
      };

      // 开始读取文件（转换为 Base64）
      reader.readAsDataURL(file);
    },
    cancelUp() {
      this.file = "";
      this.fileName = "";
      this.uploadfile = "none";
      document.getElementsByClassName("addfile")[0].value = "";
    },
    clickEdit(a) {
      this.addOrEdit = "编辑";
      this.tableData.forEach((item) => {
        if (item.id == a) {
          this.compare = JSON.stringify({
            image: item.image,
            companyEnglishName: item.companyEnglishName,
            companyChineseName: item.companyChineseName,
            contractInfo: item.contractInfo,
          });
          this.image = item.image;
          this.companyEnglishName = item.companyEnglishName;
          this.companyChineseName = item.companyChineseName;
          this.id = a;

          if (item.contractInfo && item.contractInfo != "null") {
            this.contractInfo = JSON.parse(item.contractInfo);
          } else {
            this.contractInfo = [];
          }
          if (item.sumDtoList && item.sumDtoList.length > 0) {
            const uniqueUsers = item.sumDtoList;
            // [
            //   ...new Map(
            //     item.sumDtoList.map((item) => [item.shipType, item])
            //   ).values(),
            // ];

            uniqueUsers.forEach((item) => {
              item.number = item.shipNameList.length;
              item.length = uniqueUsers.length;
            });
            this.tableListDate = uniqueUsers;
          }

          // const users = [
          //   { id: 1, name: "John" },
          //   { id: 2, name: "Jane" },
          //   { id: 1, name: "John" },
          //   { id: 3, name: "Bob" },
          // ];
        }
        this.show = "block";
      });
    },
    // 删除数据
    deleteOne(a) {
      // let that = this;
      this.$alert("确定删除这条信息？", {
        confirmButtonText: "确定",
        callback: (action) => {
          if (action == "confirm") {
            service({
              method: "delete",
              url: `/ship-company/${a}`,
            })
              .then((r) => {
                if (r.status == "SUCCESS") {
                  this.$message({
                    type: "success",
                    message: "删除成功",
                  });

                  this.getRenderList();
                  this.show = "none";
                }
              })
              .catch((err) => {
                this.$message({
                  type: "danger",
                  message: "出错了！",
                });
              });
          } else {
            this.$message({
              type: "info",
              message: "取消删除",
            });
          }
        },
      });
    },
    // 弹窗确认按钮
    sureAdd() {
      this.data.image = this.image;
      this.data.id = this.id;
      this.data.shipTypeList = this.shipTypeList;
      this.data.shipTypeSumDto = this.shipTypeSumDto;
      this.data.companyEnglishName = this.companyEnglishName;
      this.data.companyChineseName = this.companyChineseName;

      this.data.contractInfo = JSON.stringify(this.contractInfo);
      this.data.type = 1;

      if (this.addOrEdit == "编辑") {
        service({
          method: "put",
          data: this.data,
          url: "/ship-company",
        })
          .then((r) => {
            if (r.status == "SUCCESS") {
              this.$message({
                type: "success",
                message: "修改成功",
              });
              this.getRenderList();
              this.show = "none";
              this.clearCanShu();
              this.cancelUp();
            }
          })
          .catch((err) => {
            this.$message({
              type: "info",
              message: "出错了！",
            });
          });
      } else {
        service({
          method: "post",
          data: this.data,
          url: "/ship-company",
        })
          .then((r) => {
            if (r.status == "SUCCESS") {
              this.$message({
                type: "success",
                message: "新增成功",
              });
              this.getRenderList();
              this.show = "none";
              this.clearCanShu();
              this.cancelUp();
            }
          })
          .catch((err) => {
            this.$message({
              type: "info",
              message: "出错了！",
            });
          });
      }
    },
    close() {
      this.show = "none";
      this.show1 = "none";
      this.clearCanShu();
      this.cancelUp();
    },
    // 新增
    addOne() {
      this.addOrEdit = "新增";
      // this.$refs["dialog"].style.display = show;
      this.show = "block";
    },

    // 导出文件

    sendMessage() {
      let res = rename();
      EventBus.emit("custom-event", res);
    },
    // 获取列表数据
    async getRenderList() {
      let data = {
        type: 1,
      };

      await service({
        methods: "get",
        url: "/ship-company/find-all",
        params: data,
      })
        .then((e) => {
          this.tableData = e.data;
        })
        .catch((err) => {});
    },

    clearCanShu() {
      this.image = "";
      this.id = null;
      this.tableListDate = [];
      this.imageContain = "";
      this.shipTypeList = [];
      this.shipTypeSumDto = {};
      this.companyEnglishName = "";
      this.companyChineseName = "";
      this.contractInfo = [];
      this.data = {
        image: "",
        id: "",
        shipTypeList: [],
        shipTypeSumDto: {},
        companyEnglishName: "",
        companyChineseName: "",
        contractInfo: [],
        type: 0,
      };
    },

    handSize() {
      if (window.innerWidth > 630) {
        if (this.$store.state.width == 200) {
          this.tableWidth = (window.innerWidth - 170) * 0.985 - 20 + "px";
        } else if (this.$store.state.width == 90) {
          this.tableWidth = (window.innerWidth - 60) * 0.985 - 20 + "px";
        }
      } else {
        this.tableWidth = window.innerWidth - 30 + "px";
      }
    },
  },

  watch: {
    "$store.state.width"(newVal, oldVal) {
      //对数据执行操作
      if (window.innerWidth > 630) {
        if (newVal == 90) {
          this.tableWidth = (window.innerWidth - 60) * 0.985 - 20 + "px";
        } else if (newVal == 200) {
          this.tableWidth = (window.innerWidth - 170) * 0.985 - 20 + "px";
        }
      }
    },
    $route(to, from) {
      // 在这里根据参数的变化执行刷新页面的逻辑
      if (to.name == from.name) {
        this.close();
      }
    },
  },

  created() {
    this.sendMessage();
    this.getRenderList();

    // this.getYear();
  },
  beforeMount() {
    if (window.innerWidth > 630) {
      if (this.$store.state.width == 200) {
        this.tableWidth = (window.innerWidth - 170) * 0.985 - 20 + "px";
      } else if (this.$store.state.width == 90) {
        this.tableWidth = (window.innerWidth - 60) * 0.985 - 20 + "px";
      }
    } else {
      this.tableWidth = window.innerWidth - 30 + "px";
    }
  },
  mounted() {
    let that = this;

    window.addEventListener("resize", this.handSize);
  },
  beforeUnmount() {
    window.removeEventListener("resize", this.handSize);
  },
};
</script>
<style lang="less" scoped>
.dialog2 {
  z-index: 100000;
}
/* 去掉表头的边框（如果表头有单独的边框样式） */
.custom-date-picker-width .el-input__inner {
  width: 100% !important; /* 修改为你想要的宽度 */
}
.no-calendar-icon .el-popper .el-picker-panel {
  display: none;
}
.dialogInput {
  width: 100%;
  height: 100%;
  outline: none;
  border: none;
}
.addOneLine {
  width: 100%;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  img {
    cursor: pointer;
  }
}
.chuanxin {
  margin-top: 10px;
  width: 100%;
  font-size: 15px;
  text-align: center;
  color: #365488;
}
.chuanxinTable {
  width: 540px;
  margin: auto;
  height: 200px;
  color: #365488;
}
.el-table__border-left-patch:after {
  height: 0;
}
.addfile {
  width: 100%;
  height: 40px;
  font-size: 15px;
}
.addfile::file-selector-button {
  width: 100%;
  height: 4vh;
  background-color: #1e9fff;
  border: 1px solid #1e9fff;
  border-radius: 3px;
  cursor: pointer;
  color: #fff;
  font-size: 15px;
}
.fileName {
  font-size: 15px;
  color: black;
  height: 3vh;
  line-height: 3vh;
  width: 100%;
  text-align: center;
}

.manyInput {
  width: 80%;
  height: 80vh;
  margin: auto;
  overflow: auto;

  .iuptInnerContain {
    width: 100%;
    display: flex;
    flex-wrap: wrap;

    .inputInner {
      width: 375px;
      height: 35px;
      margin-top: 10px;
      margin-right: 10px;
      display: flex;
      align-items: center;

      color: #365488;
      .name {
        width: 150px;
        height: 100%;
        line-height: 4vh;
        text-align: right;
        font-size: 15px;
      }

      .name1 {
        width: 100px;
        height: 100%;
        height: 100%;
        margin-left: 15px;
        line-height: 3vh;
        // justify-content: center;
        border-radius: 5px;
        outline: none;
        font-size: 15px;
        border: none;
        background: #5cc735;
        color: white;
      }
      .inputContainer {
        width: 210px;
        margin-left: 5px;
      }
      .el-input__inner {
        background: white !important;
      }
      input {
        width: 220px;
        height: 34px;
        margin-left: 5px;
        border-radius: 5px;
        text-indent: 1em;
        outline: none;
        border: none;
        background: white !important;
        color: #365488;
        border: 1px solid #dcdfe6;
      }
      input::-webkit-input-placeholder {
        color: #a8abb2;
      }
      input[type="date"] {
        // padding: 5px;
        color: #365488;
        text-align: left;
        // border: 1px solid #365488;
        border-radius: 4px;
        // background-color: #fff;
        box-sizing: border-box; /* 确保内边距和边框不会影响元素的总宽度 */
      }
    }
    .el-date-picker .el-picker-panel {
      background-color: white !important; /* 你想要的背景颜色 */
    }
  }
}
.dialogText {
  margin: auto;
  width: 50%;
  line-height: 4vh;
  font-size: 25px;
  color: black;
  // text-indent: 10px;
  text-align: center;
  // font-size: 20px;
  font-weight: 800;
}

.dialog,
.dialog1,
.dialog3,
.dialog4 {
  width: 100%;
  height: 100%;
  background: #dfe6e8;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  z-index: 100;
}

.loadHomeWork {
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: relative;
  .loadHomeWorkIneer {
    width: 98.5%;
    height: 91vh;
    margin: auto;
    margin-top: 1vh;
    background: white;

    .loadSecond {
      width: 280px;

      color: black;
      text-align: center;
      line-height: 33px;
      color: black;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-left: 10px;
      font-size: 15px;
      .seleteYear {
        width: 200px;
        height: 30px;
        display: flex;
        align-items: center;

        .slecteName {
          width: 70px;
          font-size: 16px;
          text-align: left;
          font-weight: 600;
        }
        select {
          width: 140px;
          font-size: 16px;
        }
      }
    }
  }
  // background: blue;
}
.table {
  width: 98.5%;
  margin: auto;
  // margin-top: 2vh;
  height: 65vh;
  // background: red;
}
.table1 {
  height: 70vh;
}

/*去掉表格单元格边框*/
.customer-no-border-table th {
  border: none;
}
.customer-no-border-table td,
.customer-no-border-table th.is-leaf {
  border: none;
}
/*表格最外边框*/
.customer-no-border-table .el-table--border,
.el-table--group {
  border: none;
}
/*头部边框*/
.customer-no-border-table thead tr th.is-leaf {
  border: 0px solid #ebeef5;
  border-right: none;
}
.customer-no-border-table thead tr th:nth-last-of-type(2) {
  border-right: 0px solid #ebeef5;
}
/*表格最外层边框-底部边框*/
.customer-no-border-table .el-table--border::after,
.customer-no-border-table .el-table--group::after {
  width: 0;
}
.customer-no-border-table::before {
  width: 0;
}
.customer-no-border-table .el-table__fixed-right::before,
.el-table__fixed::before {
  width: 0;
}
.customer-no-border-table .el-table__header tr th {
  background: #fff;
  color: #333333;
  padding: 3px;
  border: 0px;
  font-size: 15px;
}
.logoAndName {
  width: 100%;
  height: 180px;
  // background: red;
  display: flex;
  align-items: center;
  justify-content: center;
  .logo {
    height: 100%;
  }
  .name1 {
    width: 100px;
    height: 100px;
    border: 1px solid grey;
    margin-right: 10px;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .name {
    color: black;
    .chineseName,
    .EnglishName {
      padding: 0 0 5px 0;
      input {
        outline: none;
        border: none;
        min-width: 100px;
        max-width: 200px;
        width: fit-content;
        text-align: center;
        font-size: 25px;
        font-weight: 600;
      }
    }
  }
}
.everyShipContain::-webkit-scrollbar {
  width: 5px;
  /* 对于垂直滚动条，设置宽度 */
  height: 12px;
  /* 对于水平滚动条，设置高度 */
}

/* 滚动条轨道 */
.menu::-webkit-scrollbar-track {
  background: #b5bec4;
  /* 背景颜色 */
}

/* 滚动条滑块 */
.menu::-webkit-scrollbar-thumb {
  background: #b5bec4;
  /* 滑块颜色 */
}
@media (min-width: 0px) and (max-width: 960px) {
  .manyInput {
    width: 375px !important;
    display: block !important;
    .inputInner {
      margin: auto !important;
      // margin-top: 10px !important;
    }
  }
  .closeAndSrue {
    width: 150px;
  }
  .chuanxinTable {
    width: 370px;
    margin: auto;
    height: 200px;
    background: red;
  }
}
</style>
